# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-tqdm
_pkgname=tqdm
pkgver=4.38.0
pkgrel=1
pkgdesc='Fast, Extensible Progress Meter.'
arch=('any')
url='https://pypi.org/project/tqdm/#files'
license=('MIT')
depends=('python2')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('54d6e63213a4bb07c16fc36e821c963764fba4fa23593b0116a967877c11306259dbf77ffb8c24048548127cb06583c8d5cfcbf5e7538df9856c5056ad091d6d')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  mv "$pkgdir/usr/bin/$_pkgname" "$pkgdir/usr/bin/${_pkgname}2"
}

